package com.cnsoft.persistent.player.U101020PlayerAddress;

import java.util.ArrayList;
import java.util.HashMap;

import org.cnsoft.framework.apidoc.MyApiDocSupport;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * 会员收货地址表接口
 */
@CrossOrigin
@RestController
@RequestMapping(value = "/doc/1.0/base/u101020playeraddress", method = { RequestMethod.GET })
public class U101020PlayerAddressApiDoc extends MyApiDocSupport {

	// 获得API地址
	public String loadApiDocName() throws Exception {
		return "会员收货地址表;/doc/1.0/base/u101020playeraddress/all";
	}

	// API文档描述
	@RequestMapping(value = "/all", method = RequestMethod.GET)
	public HashMap<String, Object> loadApiDocValue() throws Exception {
		HashMap<String, Object> all = new HashMap<String, Object>();
		// 输出基本信息
		all.put("name", "会员收货地址表");
		all.put("baseurl", "/api/1.0/base/u101020playeraddress");
		// 输出API列表
		{
			ArrayList<Object> list = new ArrayList<Object>();
			list.add("/list");
			list.add("/info");
			list.add("/append");
			list.add("/modify");
			list.add("/discard");
			all.put("apilist", list);
		}
		// 输出字段信息
		{
			ArrayList<Object> list = new ArrayList<Object>();
			HashMap<String, Object> item;
			{
				item = new HashMap<String, Object>();
				item.put("enname", "userId");
				item.put("cnname", "会员ID");
				item.put("datatype", "String");
				item.put("memo", "");

				list.add(item);
			}
			{
				item = new HashMap<String, Object>();
				item.put("enname", "consignee");
				item.put("cnname", "收货人姓名");
				item.put("datatype", "String");
				item.put("memo", "");

				list.add(item);
			}
			{
				item = new HashMap<String, Object>();
				item.put("enname", "userPhone");
				item.put("cnname", "手机号");
				item.put("datatype", "String");
				item.put("memo", "");

				list.add(item);
			}
			{
				item = new HashMap<String, Object>();
				item.put("enname", "addrPriv");
				item.put("cnname", "所在省");
				item.put("datatype", "String");
				item.put("memo", "");

				list.add(item);
			}
			{
				item = new HashMap<String, Object>();
				item.put("enname", "addrCity");
				item.put("cnname", "所在城市");
				item.put("datatype", "String");
				item.put("memo", "");

				list.add(item);
			}
			{
				item = new HashMap<String, Object>();
				item.put("enname", "addrArea");
				item.put("cnname", "所在区县");
				item.put("datatype", "String");
				item.put("memo", "");

				list.add(item);
			}
			{
				item = new HashMap<String, Object>();
				item.put("enname", "address");
				item.put("cnname", "地址信息");
				item.put("datatype", "String");
				item.put("memo", "");

				list.add(item);
			}
			{
				item = new HashMap<String, Object>();
				item.put("enname", "isDefault");
				item.put("cnname", "是否默认收货地址（1普通2默认）");
				item.put("datatype", "String");
				item.put("memo", "1普通2默认");

				list.add(item);
			}
			all.put("itemlist", list);
		}

		return all;
	}

}
